export default function App() {
  function getNumber() {
    const mid=Math.ceil(Math.random() * 100)
    return mid < 20 ? mid + 20 : mid;
  }
  function getHomeWork() {
    const one = getNumber();
    const two = getNumber();
    const work = Math.random() > 0.5 ? "+" : "-";
    if (work === "+") {
      return [one, work, two];
    } else if (one > two) {
      return [one, work, two];
    } else {
      return [two, work, one];
    }
  }
  const mid = [];
  for (let i = 0; i < 100; i++) {
    mid.push(getHomeWork());
  }
  console.log(mid);

  return (
    <>
      <div style={{ display: "flex",height:'20px',alignItems:'center'}}>
        <p style={{flex:'1'}}>姓名：____________ 日期:_____________</p>
        <p style={{flex:'1'}}>姓名：____________ 日期:_____________</p>
      </div>
      <ul style={{ display: "flex", flexWrap: "wrap" }}>
        {mid.map((item) => {
          return (
            <li
              style={{ width: "150px", height: "40px" }}
            >{`${item[0]} ${item[1]} ${item[2]} =`}</li>
          );
        })}
      </ul>
    </>
  );
}
